<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="description" content="Metro, a sleek, intuitive, and powerful framework for faster and easier web development for Windows Metro Style.">
    <meta name="keywords" content="HTML, CSS, JS, JavaScript, framework, metro, front-end, frontend, web development">
    <meta name="author" content="Sergey Pimenov and Metro UI CSS contributors">

    <link rel='shortcut icon' type='image/x-icon' href='favicon.ico' />
    <title>Slider :: Metro UI CSS - The front-end framework for developing projects on the web in Windows Metro Style</title>

    <link href="css/metro.css" rel="stylesheet">
    <link href="css/metro-icons.css" rel="stylesheet">
    <link href="css/metro-responsive.css" rel="stylesheet">
    <link href="css/metro-schemes.css" rel="stylesheet">

    <link href="css/docs.css" rel="stylesheet">

    <script src="js/jquery-2.1.3.min.js"></script>
    <script src="js/metro.js"></script>
    <script src="js/docs.js"></script>
    <script src="js/prettify/run_prettify.js"></script>
    <script src="js/ga.js"></script>
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

</head>
<body>
    <div class="container page-content">
        <h1><a href="index.html" class="nav-button transform"><span></span></a>&nbsp;Slider</h1>

        @@adsense

        <div class="example" data-text="example">
            <div class="grid">
                <div class="row cells4">
                    <div class="cell">
                        <h5>Default</h5>
                        <div class="slider" data-role="slider"></div>
                    </div>
                    <div class="cell">
                        <h5>With hint</h5>
                        <div class="slider" data-role="slider" data-show-hint="true" data-position="35"></div>
                    </div>
                    <div class="cell">
                        <h5>Customize</h5>
                        <div class="slider" data-role="slider" data-complete-color="ribbed-green" data-marker-color="bg-cyan" data-color="bg-lightRed"></div>
                    </div>
                    <div class="cell">
                        <h5>Accuracy mode</h5>
                        <div class="slider" data-accuracy="10" data-role="slider" data-complete-color="ribbed-red" data-marker-color="blue" data-show-hint="true"></div>
                    </div>
                </div>
                <h3>Large size</h3>
                <div class="row cells4">
                    <div class="cell">
                        <h5>Default</h5>
                        <div class="slider large" data-role="slider"></div>
                    </div>
                    <div class="cell">
                        <h5>min(max)Value</h5>
                        <div class="slider large" data-on-change="showSliderChange" data-role="slider" data-show-hint="true" data-position="35" data-permanent-hint="true" data-hint-position="bottom" data-max-value="1000" data-min-value="-300"></div>
                        <script>
                            function showSliderChange(value, slider){
                                console.log(value);
                            }
                        </script>
                    </div>
                    <div class="cell">
                        <h5>Customize</h5>
                        <div class="slider large" data-role="slider" data-complete-color="ribbed-green" data-marker-color="bg-yellow" data-color="ribbed-red"></div>
                    </div>
                    <div class="cell">
                        <h5>Accuracy mode</h5>
                        <div class="slider large" data-accuracy="10" data-role="slider" data-complete-color="ribbed-red" data-marker-color="blue" data-show-hint="true"></div>
                    </div>
                </div>
                <div class="row cells4">
                    <div class="cell">
                        <h5>Vertical</h5>
                        <div class="slider" data-role="slider" data-vertical="true"></div>
                        <div class="slider" data-role="slider" data-vertical="true" data-position="30"></div>
                        <div class="slider" data-role="slider" data-vertical="true" data-colors="red, yellow, green"></div>
                        <div class="slider" data-role="slider" data-vertical="true" data-position="75" data-show-hint="true"></div>
                        <div class="slider large" data-role="slider" data-vertical="true" data-position="75" data-show-hint="true" data-permanent-hint="true"></div>
                    </div>
                    <div class="cell">
                        <h5>Vertical With hint</h5>
                        <div class="slider" data-role="slider" data-show-hint="true" data-vertical="true"></div>
                    </div>
                    <div class="cell">
                        <h5>Vertical Customize</h5>
                        <div class="slider" data-role="slider" data-complete-color="ribbed-red" data-marker-color="blue" data-vertical="true"></div>
                    </div>
                    <div class="cell">
                        <h5>Accuracy mode</h5>
                        <div class="slider" data-accuracy="10" data-role="slider" data-complete-color="ribbed-red" data-vertical="true" data-show-hint="true"></div>
                    </div>
                </div>

                <div class="row">
                    <div class="cell">
                        <h5>Put slider value to input on event data-on-*</h5>
                        <div class="slider large" data-on-change="dropValueToInput" data-role="slider" data-max-value="1000" data-min-value="0"></div>
                        <div class="input-control text">
                            <input id="slider_input" value="0">
                        </div>
                        <script>
                            function dropValueToInput(value, slider){
                                $("#slider_input").val(value);
                            }
                        </script>
                        <pre class="prettyprint linenums"><code>
                            &lt;div class="slider large"
                                    data-on-change="dropValueToInput"
                                    data-role="slider"
                                    data-max-value="1000"
                                    data-min-value="0"&gt;&lt;/div&gt;
                            &lt;div class="input-control text"&gt;
                                &lt;input id="slider_input" value="0"&gt;
                            &lt;/div&gt;
                            &lt;script&gt;
                                function dropValueToInput(value, slider){
                                    $("#slider_input").val(value);
                                }
                            &lt;/script&gt;
                        </code></pre>
                        <h5>Put slider value to input on data-target</h5>
                        <div class="slider large" data-target="#slider_input2" data-role="slider" data-max-value="1000" data-min-value="0"></div>
                        <div class="input-control text">
                            <input id="slider_input2" value="0">
                        </div>
                        <pre class="prettyprint linenums"><code>
                            &lt;div class="slider large"
                                    data-target="#slider_input"
                                    data-role="slider"
                                    data-max-value="1000"
                                    data-min-value="0"&gt;&lt;/div&gt;
                            &lt;div class="input-control text"&gt;
                                &lt;input id="slider_input" value="0"&gt;
                            &lt;/div&gt;
                        </code></pre>
                    </div>
                </div>
            </div>
        </div> <!-- End of example -->

        <div class="example" data-text="code">
            <h5>Declarative style</h5>
            <pre class="prettyprint linenums"><code>
                &lt;div class="slider" data-role="slider"&gt;&lt;/div&gt;
            </code></pre>

            <h5>Javascript style</h5>
            <pre class="prettyprint linenums"><code>
                &lt;div class="slider" id="slider"&gt;&lt;/div&gt;

                &lt;script&gt;
                    $(function(){
                        $("#slider").slider();
                    });
                &lt;/script&gt;
            </code></pre>
        </div>

        <h3>Options</h3>
        <table class="table bordered border">
            <thead>
            <tr>
                <td>Parameter</td>
                <td>Data-*</td>
                <td>Type</td>
                <td>Default value</td>
                <td>Description</td>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>position</td>
                <td style="white-space: nowrap">data-position</td>
                <td>int</td>
                <td>0</td>
                <td>Init position for slider</td>
            </tr>
            <tr>
                <td>accuracy</td>
                <td style="white-space: nowrap">data-accuracy</td>
                <td>int</td>
                <td>0</td>
                <td>Accuracy for slider change value</td>
            </tr>
            <tr>
                <td>color</td>
                <td style="white-space: nowrap">data-color</td>
                <td>string</td>
                <td>default</td>
                <td>Slider panel color (background). Can be hex color or class name</td>
            </tr>
            <tr>
                <td>completeColor</td>
                <td style="white-space: nowrap">data-complete-color</td>
                <td>string</td>
                <td>default</td>
                <td>Slider complete color (background). Can be hex color or class name</td>
            </tr>
            <tr>
                <td>markerColor</td>
                <td style="white-space: nowrap">data-marker-color</td>
                <td>string</td>
                <td>default</td>
                <td>Slider marker color (background). Can be hex color or class name</td>
            </tr>
            <tr>
                <td>showHint</td>
                <td style="white-space: nowrap">data-show-hint</td>
                <td>boolean</td>
                <td>false</td>
                <td>Show or hide hint for value when slider change value</td>
            </tr>
            <tr>
                <td>permanentHint</td>
                <td style="white-space: nowrap">data-permanent-hint</td>
                <td>boolean</td>
                <td>false</td>
                <td>If this value is true and showHint is true hint visible in permanent mode</td>
            </tr>
            <tr>
                <td>vertical</td>
                <td style="white-space: nowrap">data-vertical</td>
                <td>boolean</td>
                <td>false</td>
                <td>Show slider in vertical mode</td>
            </tr>
            <tr>
                <td>minValue</td>
                <td style="white-space: nowrap">data-min-value</td>
                <td>int</td>
                <td>0</td>
                <td>Min slider value</td>
            </tr>
            <tr>
                <td>maxValue</td>
                <td style="white-space: nowrap">data-max-value</td>
                <td>int</td>
                <td>100</td>
                <td>Max slider value</td>
            </tr>
            <tr>
                <td>returnType</td>
                <td style="white-space: nowrap">data-return-type</td>
                <td>string</td>
                <td>value</td>
                <td>Type of returned value: real value or percent</td>
            </tr>
            <tr>
                <td>animate</td>
                <td style="white-space: nowrap">data-animate</td>
                <td>boolean</td>
                <td>true</td>
                <td>Animated slider marker moving when user click on slider</td>
            </tr>
            <tr>
                <td>colors</td>
                <td style="white-space: nowrap">data-colors</td>
                <td>string with comma delimiter</td>
                <td>false</td>
                <td>Defines a set of colors that will be applied uniformly to complete color when marker is moving</td>
            </tr>
            </tbody>
        </table>

        <h3>Events</h3>
        <table class="table bordered border">
            <thead>
            <tr>
                <td>Event</td>
                <td>Data-*</td>
                <td>Params</td>
                <td>Description</td>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>onChange</td>
                <td style="white-space: nowrap">data-on-change</td>
                <td>(value, slide)</td>
                <td>The event fired when the user change slider marker position</td>
            </tr>
            </tbody>
        </table>
    </div>

    @@hit

</body>
</html>